#{extends 'main.html' /}
#{set title:'Home' /}
#{set 'moreScripts'}
    #{script 'application/indexSearch.js'/}
#{/set}

<form class="form-inline" action="@{Application.indexSearch()}">
  <div class="form-group">
    <input type="text" class="form-control" name="search" id="search_input" placeholder="输入美剧名称" value="${search}">
  </div>
  <select class="selectpicker">
  #{list items:models.Movie.T, as:'t'}
    <option value="${t.name()}">${t.label()}</option>
  #{/list}
  </select>
  <button type="submit" class="btn btn-info">搜索</button>
  <input type="button" class="btn btn-success" id="makeBtn" value="定制" data-action="@{Application.makePlan()}">
</form>
<br>

<table class="table table-bordered table-hover">
#{list items:projects, as:'p'}
  <tr>
    <td><input type="checkbox" data-name="${p.name}" data-url="${p.href}"></td>
    <td>${p_index}</td>
    <td>${p.name} </td>
    <td><a href="${p.href}" target="_blank">${p.href}</a></td>
  </tr>
#{/list}
</table>